//
//  AppDelegate.m
//  WDBMS
//
//  Created by YeJary on 2025/5/9.
//

#import "AppDelegate.h"
#import "ViewController.h"
#import "BMSLifecycleManager.h"
#import "BMSAuthSDK.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // iOS 13 及以上由 SceneDelegate 管理窗口
    [[BMSLifecycleManager shared]startMonitoring];
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    ViewController *vc = [[ViewController alloc] init];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
    self.window.rootViewController = nav;
    [self.window makeKeyAndVisible];
    [[BMSAuthSDK shareInstance]initSDKCompletion:^(BOOL success,
                                                   BOOL privacyAgreed,
                                                   BOOL trackingAuthorized,
                                                   BOOL didRealname,
                                                   NSString * _Nonnull uuid) {
        if (success) {
            NSLog(@"✅ 初始化完成, uuid: %@", uuid);
        } else {
            NSLog(@"❌ 初始化失败（用户拒绝授权）");
        }
    }];
    return YES;
}


@end
